package chen;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.PostConstruct;

/**
 * Created by zhanghui on 18/9/26.
 */
@Controller
public class HelloWorld  {

	@PostConstruct
	public void say() {
		System.out.println("------------- say method");
	}

	//    使用RequestMapping映射请求
//    返回值会通过视图解析器解析为实际的物理视图,对于InterResou.....视图解析器会做如下的解析
//    prefix+returnval+后缀
	@RequestMapping(value = "/helloworld")
	public String hello()
	{
		System.out.println("hello");
		return "success";
	}
}
